unit GLGUIState;

interface

{$I GLScene.inc}

uses
  StrUtils,
  GLSCrossXML,
  GLGUIUtils,
  GLGUITokens;

type
  TGLGUICustomStateDescriptor = class
  protected
    FType: TGLGUIState;
    FName: String;
    FIsParsed: Boolean;
    FXMLNode: GLSXMLNode;
    function GetType: TGLGUIState; virtual;
    function GetIsParsed: Boolean; virtual;
    procedure SetType(AType: TGLGUIState); virtual;
  public
    constructor Create(AType: String); virtual;
    procedure Parse; virtual;
    function ToString: String; override;
    property State: TGLGUIState read GetType;
    property IsParsed: Boolean read GetIsParsed;
  end;

implementation

constructor TGLGUICustomStateDescriptor.Create(AType: String);
begin
  FType := StringToGUIState(AType);
  FName := AType;
end;

procedure TGLGUICustomStateDescriptor.Parse;
begin
end;

function TGLGUICustomStateDescriptor.GetType: TGLGUIState;
begin
  Result := FType;
end;

function TGLGUICustomStateDescriptor.GetIsParsed: Boolean;
begin
  Result := FIsParsed;
end;

procedure TGLGUICustomStateDescriptor.SetType(AType: TGLGUIState);
begin
  FType := AType;
end;

function TGLGUICustomStateDescriptor.ToString: String;
begin
  Result := FName;
end;

end.
